<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查询员工</title>
<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link  href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>

<div class="ricoh_content_k">
	<div class="ricoh_title">--- 查询员工 --- </div>
	<div class="ricoh_content_in">
   		<div class="find_k">
   		
   		  <form action="member_listEmployee.action" method="post">
           	<div class="find_kd">姓名：
            	  <input type="text" name="name" id="name" value="${name}"/>
           	</div>
           	
           	<!--
            <div class="find_kd">性别：
               <input type="radio" name="radio" id="radio" value="radio" />男
               <input type="radio" name="radio" id="radio2" value="radio" />女
            </div>
            -->
            
            <p style="padding-top:2px; padding-left:50px;"><input type="submit" name="Submit" value="查询"  class="send_btn"/></p>
          </form>
       
        </div>
        <div class="find_result">
        <table class="result">
			<caption>查询结果：</caption>
			<thead>
				<tr>
					<th width="10%">姓名</th>
				    <th width="5%">性别</th>
				    <th width="10%">职位</th>
					<th width="10%">出生日期</th>
					<th width="12%">联系方式</th>
                    <th width="30%">家庭住址</th>
                    <th width="10%">入职时间</th>
				</tr>
			</thead>	
			<tfoot>
				<tr>
					<th>总共:${persons.totalCount}条记录</th>
					<td colspan="7">
						<h:pages currentPage="%{currentPage}" url="member_listEmployee.action" totalPage="%{totalPage}" cssClass="pagnation" showPageNumber="3">
							
						</h:pages>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<s:iterator value="persons.data" status="person">
					<s:if test="(#person.index)%2==1">
						<tr >
							<th>${name}</th>
							<td><h:constantConvert type="gender" value="%{gender}"></h:constantConvert></td>
							<td><h:constantConvert type="category" value="%{category}"></h:constantConvert></td>
							<td><h:dateTimeFormat value="%{birthday}" pattern="yyyy.MM.dd" type="date"/></td>
							<td>${contactWay}</td>
		                    <td>${homeAddress }</td>
		                    <td><h:dateTimeFormat value="%{beginTime}" pattern="yyyy.MM.dd" type="date"/></td>
						</tr>
					</s:if>
					<s:else>
						<tr class="odd">
							<th>${name}</th>
							<td><h:constantConvert type="gender" value="%{gender}"></h:constantConvert></td>
							<td><h:constantConvert type="category" value="%{category}"></h:constantConvert></td>
							<td><h:dateTimeFormat value="%{birthday}" pattern="yyyy.MM.dd" type="date"/></td>
							<td>${contactWay}</td>
		                    <td>${homeAddress }</td>
		                    <td><h:dateTimeFormat value="%{beginTime}" pattern="yyyy.MM.dd" type="date"/></td>
						</tr>
					</s:else>
				</s:iterator>
			</tbody>		
		</table>
        </div>
  </div>
</div>

</div>
</div>

<jsp:include page="../footer.jsp"></jsp:include>

</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
//SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto")

ddtabmenu.definemenu("ddtabs2", 1) //initialize Tab Menu #2 with 2nd tab selected

</script>
</html>
